<!-- 购买需求 完结-->
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<link href="${pageContext.request.contextPath}/css/bootstrap/bootstrap.min.css"rel="stylesheet">
<link type="text/css" rel="stylesheet" media="all" href="${pageContext.request.contextPath}/css/enterprise/s1.css" />
<link href="${pageContext.request.contextPath}/css/common/page.css"rel="stylesheet">
<script src="${pageContext.request.contextPath}/js/common/jquery-1.9.1.min.js"></script>
<script src="${pageContext.request.contextPath}/js/common/bootstrap.min.js"></script>
<script src="${pageContext.request.contextPath}/js/common/changePage.js"></script>
<title></title>
<style>
.even {
	background: white;
}

.odd {
	background: rgba(120, 205, 205, 0.21);
}
</style>
</head>

<body>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<table class="table table-striped table-hover">
					<thead>
						<tr>
							<th>作品名</th>
							<th>购买类型</th>
							<th>购买者</th>
							<th>联系电话</th>
							<th>备注</th>
							<th>提交时间</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody id="atbody">
						<c:forEach items="${json.list}" var="data">
							<tr>
								<td>${data.design.name  }</td>
								<td>${data.design_id  }</td>
								<td>${data.purchase_type_code }</td>
								<td>${data.buyer_name  }</td>
								<td>${data.phone }</td>
								<td><fmt:formatDate value="${data.datetime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
								<td><a href="${pageContext.request.contextPath }/demand/deleteDemand.do?id=${data.id}">删除</a></td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
			</div>
			<!--分页-->
			<div class="paging">
			    <div style="display: none;">
			        <span class="userTypeId">designer_id</span>  <!--用户类型id--> 
				    <span class="pages">${json.property.pageCount}</span>  <!--页数-->  
			        <span class="pageIndex">${json.property.pageIndex}</span>  <!--当前页码-->  
			        <span class="pagesize">12</span>   <!--每页记录数-->  
			        <span class="hasNext">${json.property.hasNext}</span>   <!--是否有下一页(boolean)-->  
			        <span class="selfUrl">/demand/getDemand.do</span>    <!--请求action-->
			        <span class="userId">${designer_id}</span>   <!--用户ID-->  
			        <span class="commonUrl">${pageContext.request.contextPath}</span>   <!--绝对路径-->
			    </div>
			    <div class="showPaging">
			        <a class="prev" href="${pageContext.request.contextPath}/demand/getDemand.do?designer_id=${designer_id }&pageindex=${json.property.pageIndex-1 }&pagesize=12">
					上一页</a> 
				<select class="pageNum">
					<option value="0">请选择跳转的页数</option>
					<option value="1">第1页</option>
				</select> 
				<a class="next" href="${pageContext.request.contextPath}/demand/getDemand.do?designer_id=${designer_id }&pageindex=${json.property.pageIndex+1 }&pagesize=12">
					下一页</a>
			    </div>
			</div>
			<!--分页结束-->
		</div>
	</div>
</body>

</html>
